//
//  ST_BaseMacro.h
//  ST_BaseMall
//
//  Created by 昱胜 on 2022/9/2.
//

#ifndef ST_BaseMacro_h
#define ST_BaseMacro_h

//色值
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#define RGB(r,g,b) RGBA(r,g,b,1.0f)
#define HEXCOLOR(hex) [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 green:((float)((hex & 0xFF00) >> 8)) / 255.0 blue:((float)(hex & 0xFF)) / 255.0 alpha:1]

#define kIs_iphone [[UIDevice currentDevice].model isEqualToString:@"iPhone"]
#define iPhoneX kScreenWidth >=375.0f && kScreenHeight >=812.0f&& kIs_iphone

#define kSTWindow [[[UIApplication sharedApplication]delegate] window]

///** 状态栏高度 */
//#define kStatusBarH CGRectGetHeight([UIApplication sharedApplication].statusBarFrame)

/*状态栏高度*/
#define kStatusBarHeight (CGFloat)(iPhoneX?(44.0):(20.0))
/*导航栏高度*/
#define kNavBarHeight (44)
/*状态栏和导航栏总高度*/
#define kNavBarAndStatusBarHeight (CGFloat)(iPhoneX?(88.0):(64.0))
/*TabBar高度*/
#define kTabBarHeight (CGFloat)(iPhoneX?(49.0 + 34.0):(49.0))
/*顶部安全区域远离高度*/
#define kTopBarSafeHeight (CGFloat)(iPhoneX?(44.0):(0))
 /*底部安全区域远离高度*/
#define kBottomSafeHeight (CGFloat)(iPhoneX?(34.0):(0))
/*iPhoneX的状态栏高度差值*/
#define kTopBarDifHeight (CGFloat)(iPhoneX?(24.0):(0))


#define WeakSelf(weakSelf)  __weak __typeof(&*self)weakSelf = self;

#define WEAK  @weakify(self);
#define STRONG  @strongify(self);

#endif /* ST_BaseMacro_h */

